home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2443 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.0 KB  |  45 lines

  1. Newsgroups: comp.infosystems.www.authoring.cgi,comp.lang.c
  2. Path: istar.net!infoshare!whome!gts!westonia!ppp-104
  3. From: Rob.Ross@smtp.ajaxshuttle.com (Rob Ross)
  4. Subject: Re: data transfer using POST method
  5. X-Nntp-Posting-Host: ppp-104.ppp.westonia.com
  6. Message-ID: <DLIn76.DpG@westonia.com>
  7. Sender: news@westonia.com
  8. Organization: TAS Online Services
  9. X-Newsreader: News Xpress Version 1.0 Beta #4
  10. References: <4dpi1p$s7@driene.student.utwente.nl>
  11. Date: Sun, 21 Jan 1996 05:25:56 GMT
  12.  
  13. In article <4dpi1p$s7@driene.student.utwente.nl>,
  14.    d.hornstra@student.utwente.nl (Daniel Hornstra) wrote:
  15. >I'm trying to send a long text (from a textarea box) to my cgi-binary. First 
  16. >tried using the GET method, but soon i found out that a windows-environment 
  17. >entry cannot be longer than 256 characters. So i now try using the POST 
  18. method, 
  19. >but i don't know how the data is exchanged between the server and the 
  20. cgi-bin.
  21. >
  22. >There is a CONTENT_FILE entry containing the input, and it's put in my \temp\ 
  23. >dir. But when i try to read this temporary file from within my program, the 
  24. >file does not exist. Can anyone help me out on this? It's pretty basic i 
  25. >guess... I use pascal to write the program, so an example in this language on 
  26. >how it should receive the data would be great!
  27.  
  28. With the POST method, the data is sent to the CGI program via STDIN.  You may 
  29. read the data as you would from the standard input.
  30.  
  31. I am having a problem myself relating to this.  I am writing a CGI that 
  32. handles large form data, so I am using the POST method.  My CGI is being 
  33. written in C and being compiled by Turbo C++ 3.0 for DOS.  My main problem is 
  34. that whenever I read from STDIN, my program waits for the ENTER key to be 
  35. pressed before it processes the information read from STDIN via fread, 
  36. fgetchar, or fgetc.  I do not want to use the CONIO.H lib as it isn't ANSI C 
  37. specific.  Does anyone have any suggestions as to how I can avoid the required 
  38. ENTER keypress with the above listed functions?
  39.  
  40. Thanks,
  41.  
  42. Rob
  43.  
  44.